/*
 * @Author: wangshuixin 2412658453@qq.com
 * @Date: 2024-09-05 12:50:59
 * @LastEditors: wangshuixin 2412658453@qq.com
 * @LastEditTime: 2024-09-09 18:06:56
 * @FilePath: \tspods\components\equation\compose.ts
 * @Description: 衍生数学公式
 */

// 提取标准方程的标准式
export const getStandardExpression = (equation: string) => {
  return equation.replace('=0', '');
}

// 提取标准方程的项 - 通过加减乘除，分离出标准方程的项
export const getTermsOfEquations = (equation: string) => {
  const expression = getStandardExpression(clearAllSpace(equation))
  // 使用正则表达式同时匹配全角和半角的加减乘除字符作为分隔符
  return expression.split(/[\uFF0B\+\uFF0D\-\u00D7\*\uFF0F\/]/);
}

// 转换矩阵
export const convertMatrixFromStandardEquationSystem = (equationSystem: Array<string>, variables: Array<string> = ['x', 'y', 'z']) => {
  
  console.log("转换矩阵，未配置")
}
// 转换逆矩阵
export const convertInverseMatrix = () => {
  console.log("转换逆矩阵，未配置")
}